# Contributor: André Klitzing <aklitzing@gmail.com>
# Maintainer: André Klitzing <aklitzing@gmail.com>
pkgname=buildcache
pkgver=0.28.3
pkgrel=0
pkgdesc="Advanced compiler accelerator"
url="https://github.com/mbitsnbites/buildcache"
arch="all !s390x !armhf" # failing tests
license="Zlib"
makedepends="
	openssl-dev>3
	cmake
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/mbitsnbites/buildcache/archive/refs/tags/v$pkgver.tar.gz"

build() {
	cmake \
	-B build \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=/usr \
	"src"
	cmake --build build
}

check() {
	cmake --build build --target test
}

package() {
	DESTDIR="$pkgdir" cmake --install build
	rm -rf "$pkgdir/usr/share/lua-examples/"
}

sha512sums="
46b8dce6619cd99f2e45f804f6ee5d09ffb0fa636a9e8a9cdcf99771740dabeeb19ffda483df43092d6c4f928fa9e7782667a8e0ae77cf0463dc6f4a8705a130  buildcache-0.28.3.tar.gz
"
